#include <stdio.h>

int main1()
{
    //定义数组
    //数据类型  数据名[元素个数] ={值1,值2}
    int a = 10;
    int b = 20;
    int c = 30;
    int *arr[3] = {&a, &b, &c};
    // printf("%d\n", *arr[0]);
    printf("指针数组大小：%d\n", sizeof(arr));
    printf("指针元素大小：%d\n", sizeof(arr[0]));
    return 0;
}

int main()
{
    //指针数组里面元素存储的是指针
    int a[] = {1, 2, 3};
    int b[] = {4, 5, 6};
    int c[] = {7, 8, 9};
    //指针数组是一个特殊的二维数组模型
    //指针数组对应于二级指针
    int *arr[] = {a, b, c};
    printf("%p\n", arr);
    printf("%p\n", &arr[0]);
    printf("%p\n", a);
    printf("%d\n", arr[0][1]);
    printf("%p\n", arr[0]);
    printf("%p\n", a);
    printf("%p\n", &a[0]);
    for (int i = 0; i < 3; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            // printf("%d", arr[i][j]);
            // printf("%d", *(arr[i] + j));
            printf("%d", *(*(arr + i) + j));
        }
        printf("\n");
    }
    return 0;
}